﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace INSAwarsWPF
{
    /// <summary>
    /// Logique d'interaction pour DemanderNomVilleView.xaml
    /// </summary>
    public partial class DemanderNomVilleView : Window
    {
        public string ResultString { get; private set; }
        public bool ResultOk { get; private set; }

        public DemanderNomVilleView(string pretext)
        {
            InitializeComponent();
            textBoxNom.Text = pretext;
            ResultOk = false;
        }

        private void okButton_Click(object sender, RoutedEventArgs e)
        {
            ResultOk = true;
            ResultString = textBoxNom.Text;

            this.Close();
        }

        private void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            ResultOk = false;

            this.Close();
        }
    }
}
